#include "LabelSpinBox.h"

LabelSpinBox::LabelSpinBox(const QString &text, QWidget *parent) : QWidget(parent)
{
	mainLayout = new QHBoxLayout(this);
	label = new QLabel(text + ":", this);
	spinBox = new QSpinBox(this);

	mainLayout -> addWidget(label);
	mainLayout -> addWidget(spinBox);

	spinBox -> setMaximum(1000000);

	setLayout(mainLayout);

	label -> setContentsMargins(0, 0, 0, 0);
	spinBox -> setContentsMargins(0, 0, 0, 0);
	setContentsMargins(0, 0, 0, 0);
	mainLayout -> setAlignment(Qt::AlignmentFlag::AlignCenter);
}

LabelSpinBox::~LabelSpinBox()
{
	delete mainLayout;
	delete label;
	delete  spinBox;
}
